import {post, put} from '@/utils/http'

// 查询
export function getCustomerInfo(data = {}){
  // 添加默认的分页参数
  const defaultData = {
    offset: 0,
    limit: 10000,
    ...data
  }
  return post('/user/user-client/cms/customerInfo/listAll', defaultData)
}


// 新增
export function createCustomerInfo(data) {
  return post('/user/user-client/cms/customerInfo/insert', data)
}

//修改
export function updateCustomerInfo(data) {
  return post('/user/user-client/cms/customerInfo/update', data)
}

//删除
export function deleteCustomerInfo(id) {
  return post(`/user/user-client/cms/customerInfo/delete?id=${id}`)
}

//批量删除
export function deleteBatchCustomerInfo(ids) {
  // ids 应该是一个字符串，包含以逗号分隔的ID列表，例如 "1,2,3"
  return post('/user/user-client/cms/customerInfo/deleteBatch', null, {
    params: { ids }
  })
}


//查询单个
export function getCustomerInfoById(id) {
  return post('/user/user-client/cms/customerInfo/get', {id})
}